<template>
  <el-button plain :type="type" @click="onReset">
    <fa-icon class="fa-refresh" />重置</el-button>
</template>

<script>
import { common } from '@/utils/common'
export default {
  name: 'reset-button',
  props: {
    dataForm: Object,
    fixedData: {
      type: Object,
      default () {
        return {}
      }
    },
    type: {
      type: String,
      default: ''
    }
  },
  methods: {
    /**
    * @description 重置
     */
    onReset () {
      // 清空查询条件
      common.resetData(this.dataForm, this.fixedData)
    }
  }
}
</script>
